<?php
include_once("../modules/checkA.php");
include_once("../../config.php");
$plate=select_one_line_all_items($table_Prefix."plate", "mid = 'finance'");
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
?>



<?php
//接收需要修改的数据的id
$new_nid = addslashes($_REQUEST['rid']);

//传递过来的页面信息。返回的时候，会根据这些信息返回原来的页面
$nowpageid      = addslashes($_REQUEST['nowpageid']);
$sortby         = addslashes($_REQUEST['sortby']);
$term_nid       = addslashes($_REQUEST['term_nid']);
?>


<?
$_REQUEST['ai_ip']          =  addslashes($_SERVER['REMOTE_ADDR']);
$_REQUEST['apply_status']   = "";

//设置需要搜索的表格的前缀后缀
$table_Suffix = $plate['table_Suffix'];
$table        = $table_Prefix . $table_Suffix;

//设置需要搜索的表格的前缀后缀
$table_Suffix = $plate['table_Suffix'];
$table        = $table_Prefix . $table_Suffix;




echo $sql=update_date($table,$_REQUEST,"nid",$new_nid);
$query = mysql_query($sql) or die ("error:".mysql_error());



//同时把申请更新的数据标记为已经采用
$sql = "update $table SET
applystatus    = '已审核'
where rid=$new_nid";


$query = mysql_query($sql) or die ('更新申请数据状态失败');


mysql_close($con);

?>


<script type="text/javascript">
    alert("输入信息已保存，点击确认返回继续操作.");
    document.location.href = "detail-list.php?nowpageid=<? echo $nowpageid ?>&sortby=<? echo $sortby?>&nid=<? echo $term_nid ?>&sys_part=<? echo $system_part ?>"
</script>


